package com.oreilly.ez.entity;


import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.ToString;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import java.math.BigDecimal;

@Data
@Entity
@Table(name = "enrollment")
@ToString
public class Enrollment  extends BaseEntity {


  // new field...

    @Column(name = "child_name")
    private String childName;
    private String sex;
    private String age;


//    /**
//     *
//     */
//    @ManyToOne
//    @JoinColumn(name = "course_id")
//    private Course course;

    @Column(name = "guardian_relation")
    private String guardianRelation;

    @Column(name = "guardian_phone")
    private String guardianPhone;

    @Column(name = "fee_date")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private String feeDate;


    //参考价格
    private BigDecimal fee;


//    public String getCourseName(){
//        if(course == null){
//            return "";
//        }
//        return course.getSname();
//    }

}
